package com.itheima.controller;

import com.itheima.pojo.OmsCompanyAddress;
import com.itheima.service.OmsCompanyAddressService;
import com.itheima.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("companyAddress")
public class OmsCompanyAddressController {
    @Autowired
    private OmsCompanyAddressService omsCompanyAddressService;

    /**
     * 获取所有收货地址
     * @return
     */
    @GetMapping("list")
    public Result list(){
        List<OmsCompanyAddress> list=omsCompanyAddressService.list();
        return Result.success(list);

    }
}
